﻿using System;
using System.Collections.Generic;
using System.Text;

using ECCIT;
using System.Linq;
using OgilvyOne.UKNow.IDAL;
using OgilvyOne.UKNow.DAL;
using System.Collections;
using OgilvyOne.UKNow.Model;
using ECCIT.Data;
using System.Data;


namespace OgilvyOne.UKNow.BLL
{
    public class CnENnMappBLL
    {

        public CnEnMappingMod GetCnEnMapMod(int langID, int eventID,int typeID)
        {
            CnEnMappingDAL  cd=new CnEnMappingDAL ();
            #region
            CnEnMappingMod cm=cd.GetCnEnMod(langID,eventID,typeID);
            return (cm!=null?cm:null);
            #endregion

        }

        //根据中文活动ID获取数据记录
        public CnEnMappingMod GetCnEnAppModel(int typeID, int Cid, int EnID)
        {
            return GetCnEnAppModel(typeID, Cid, EnID, null);
        }

        //根据中文活动ID获取数据记录
        public CnEnMappingMod GetCnEnAppModel(int typeID,int Cid, int? Eid, int? mainID)
        {
            CnEnMappingDAL use = new CnEnMappingDAL();
            return use.GetCnEnAppModel(typeID, Cid,Eid ,mainID);
        }

        //获取所有的映射列表数据
        public DataTable CnEnMappData(int typeID)
        {
            CnEnMappingDAL use = new CnEnMappingDAL();
            return use.getCnEnMappData(typeID);
        }
        //根据中文活动ID删除映射数据记录
        public bool delete(int id,int typeID)
        {
            CnEnMappingDAL use = new CnEnMappingDAL();
            return use.delete(id, typeID);
        }
        //添加一条映射记录
        public bool Add(CnEnMappingMod model)
        {
            CnEnMappingDAL use = new CnEnMappingDAL();
            return use.Add(model);
        }
         //修改一条映射数据记录
        public bool Update(CnEnMappingMod model)
        {
            CnEnMappingDAL use = new CnEnMappingDAL();
            return use.Update(model);
        }
    }
}
